home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / libnspr4-0d.prerm < prev    next >
Text File  |  2009-08-10  |  1KB  |  41 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. migratious_files="libnspr4.so libplc4.so libplds4.so"
  6.  
  7. if [ "$1" = "abort-upgrade" -o "$1" = "failed-upgrade" ]; then
  8.  
  9.     for f in $migratious_files; do
  10.         if [ -e /usr/lib/XNOLDCONFIG_$f.new-migration ]; then
  11.             rm -f /usr/lib/$f
  12.             mv /usr/lib/XNOLDCONFIG_$f.new-migration /usr/lib/$f
  13.         fi
  14.         if [ -e /usr/lib/XNOLDCONFIG_$f.0d.new-migration ]; then
  15.             rm -f /usr/lib/$f.0d
  16.             mv /usr/lib/XNOLDCONFIG_$f.0d.new-migration /usr/lib/$f.0d
  17.         fi
  18.     done
  19.  
  20. fi
  21.  
  22.  
  23. # old-prerm upgrade version
  24. # this is the dowgrade cas where we need to reshuffle links before the upgrade happens
  25. if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" "le" "4.7.1+1.9-1ubuntu1~"; then
  26.  
  27.     for f in $migratious_files; do
  28.         if [ -L /usr/lib/$f.0d ]; then
  29.             rm -f /usr/lib/XNOLDCONFIG_$f.old-migration
  30.             mv /usr/lib/$f.0d /usr/lib/XNOLDCONFIG_$f.0d.old-migration
  31.         fi
  32.         if [ -r /usr/lib/$f -a ! -L /usr/lib/$f ]; then
  33.             rm -f /usr/lib/XNOLDCONFIG_$f.old-migration
  34.             mv /usr/lib/$f /usr/lib/XNOLDCONFIG_$f.old-migration
  35.         fi
  36.     done
  37.  
  38. fi
  39.  
  40.  
  41.